import Vue from 'vue'
import Router from 'vue-router'
import Layout from '../components/layout/layout'
import asyncRouter from './asyncRouter'
Vue.use(Router)
export default new Router({
  routes: [
    {
      path: '/',
      name: 'index',
      redirect: '/dashboard/analysis',
      component: Layout,
      meta: { title: '首页' },
      children: asyncRouter
    },
    { path: '/login', component: () => import('@/views/login/Login'), meta: { title: '登录 '} },
    { path: '/403', component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/403'), meta: { title: '403 '} },
    { path: '/404', component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/404'), meta: { title: '404 '} },
    { path: '/500', component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/500'), meta: { title: '405 '} },
    { path: '*', redirect: '/404' }
  ]
})
